<%--
  Created by IntelliJ IDEA.
  User: 王宇航
  Date: 2023/4/2
  Time: 22:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>编辑页面</title>
  <c:if test="${sessionScope.user.role ne 1}">
    <c:set var="error" value="你不是管理员无法访问！" scope="session"/>
    <c:redirect url="/index.jsp"/>
  </c:if>
</head>
<body style="text-align: center">
<h1 style="color: aqua">编辑页面</h1>
<form action="/book/editerStep2" method="post">
  <input type="hidden" name="id" value="${sessionScope.book.id}"><br>
  <input type="hidden" name="publisher" value="${sessionScope.book.publisher}"><br>
  <input type="text" name="title" placeholder="标题" value="${sessionScope.book.title}"><br>
  <input type="text" name="author" placeholder="作者" value="${sessionScope.book.author}"><br>
  <input type="date" name="publicationTime" value="${sessionScope.book.publicationTime}"><br>
  <input type="number" name="price" placeholder="价格" value="${sessionScope.book.price}"><br>
  <input type="file" name="cover" value="${sessionScope.book.cover}"><br>
  <input type="submit" value="更新修改">
</form>
<a href="/book/admin/index.jsp">返回首页</a>
</body>
</html>
